/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.gas.barapraja.admin.db.dao.impl;

import javax.persistence.Query;
import org.gas.barapraja.admin.db.dao.ChanelDao;
import org.gas.barapraja.admin.db.dao.GasEntityDao;
import org.gas.barapraja.admin.db.entity.Chanel;
import org.gas.barapraja.admin.util.AppContext;
import org.springframework.stereotype.Repository;

/**
 *
 * @author SWG
 */

@Repository(AppContext.CHANEL_DAO)
public class ChanelDaoImpl extends GasEntityDao<Chanel, Long> implements ChanelDao {

    public ChanelDaoImpl() {
    
        super();
        
    }    
    
    public Chanel findByChanelId(String ChanelId) {
        Query query=entityManager.createQuery("select a from Chanel a where a.chanelId=?1");
		query.setParameter(1, ChanelId);
		return (Chanel)query.getSingleResult();
    }
    
}
